package com.software.car.common.entity_change;

import com.software.car.entity.vo.ProjectDetailVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @Author 魔法はまだ解けない
 * @Date 2021/3/20
 */
@Mapper
public interface ProjectChangeMapper {

    ProjectChangeMapper INSTANCE = Mappers.getMapper(ProjectChangeMapper.class);

    ProjectDetailVo projectVoToVo(ProjectDetailVo detailVo);

    default String changeState(Integer state) {
        if (state == 1) {
            return "正常";
        }
        if (state == 2) {
            return "启用";
        }
        return "未定义";
    }
}
